<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::get('hello/:name', 'index/hello');


Route::group('/admin' , function (){
    Route::post('login' , 'AuthController/AdminLogin');
    Route::post('testApi' , 'AuthController/testApi');

    Route::get('studentInfo','StudentController/studentInformation');
    Route::delete('deleteStudent/:id','StudentController/deleteStudent')->model(\app\model\Student::class);
    Route::put('disable/:id','StudentController/disable')->model(\app\model\Student::class);

    Route::get('adminInformation','AdminController/getInformation');
    
    Route::get('getPaper','PaperController/getTestPaper');
    Route::post('intoPaper','PaperController/intoTestPaper');
    Route::delete('deletePaper/:id','PaperController/deleteTestPaper')->model(\app\model\Paper::class);
    Route::put('updatePaper','PaperController/updateTestPaper');
    Route::get('getExam','ExamController/getExam');
    Route::get('intoExam','ExamController/intoExam');
    Route::delete('deleteExam:id','ExamController/deleteExam')->model(\app\model\Exam::class);
    Route::get('getScore','ScoreController/getScore');
    Route::delete('deleteScore/:id','ScoreController/deleteScore')->model(\app\model\Score::class);
    Route::put('updateScore','ScoreController/updateScore');

    Route::delete('delAdmin/:id','AdminController/delAdmin')->model(\app\model\Admin::class);
    Route::post('addAdmin','AdminController/addAdmin');
    Route::put('setAdmin/:id','AdminController/setAdmin')->model(\app\model\Admin::class);

    Route::get('getTitle','TitleController/getTitle');
    Route::post('addTitleOne','TitleController/addTitleOne');
    Route::put('setTitle/:id','TitleController/setTitle')->model(\app\model\Title::class);
    Route::delete('deleteTitle/:id','TitleController/deleteTitle')->model(\app\model\Title::class);


});

Route::group('/student' , function (){
    Route::post('login' , 'AuthController/StudentLogin');
    Route::post('register' , 'AuthController/StudentRegister');

});
